<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/6/29
  Time: 17:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>班级管理页面</title>
    <style>
        a{
            float: left;
            margin-left: 50px;
            color: black;
            text-decoration: none;
            font-size: 30px;
            font-family: "楷体";
        }
        #xian1{
            width: 140px;
            height: 3px;
            background-color: red;
            margin-top: -10px;
            margin-left: 30px;
            display: none;
        }
        #xian2{
            width: 140px;
            height: 3px;
            background-color: red;
            margin-top: -10px;
            margin-left: 180px;
            display: none;
        }
        #xian3{
            width: 140px;
            height: 3px;
            background-color: red;
            margin-top: -10px;
            margin-left: 350px;
            display: block;
        }
        #xian4{
            width: 140px;
            height: 3px;
            background-color: red;
            margin-top: -10px;
            margin-left: 520px;
            display: none;
        }

        .body{
            width: 800px;
            height: 600px;
        }
        td{
            width:110px;
            font-family: "楷体";
            font-size: 20px;
            text-align: center;
        }
        table{
            border-collapse: collapse;
        }
        table,tr,td{
            border: 1px black double;
        }
    </style>

</head>
<body>

<h1 style="font-family: '楷体'">班级管理</h1>

<a href="#" id="a1">新增班</a>
<a href="#" id="a2">修改班级</a>
<a href="#" id="a3">查看班级</a>
<a href="#" id="a4">班级毕业</a>
<hr style="clear: left;">
<div id="xian1"></div>
<div id="xian2"></div>
<div id="xian3"></div>
<div id="xian4"></div>

<br />
<div class="body">
    <table>
        <tr><td style="font-weight: bold">班级id</td><td style="font-weight: bold">班级名称</td><td style="font-weight: bold">班级级别</td><td style="font-weight: bold">班级状态</td><td style="font-weight: bold">开班时间</td><td style="font-weight: bold">老师id</td></tr>
        <c:forEach items="${list}" var="k">
            <tr>
                <td>${k.cid}</td>
                <td>${k.cname}</td>
                <td>${k.cgrade}</td>
                <td>${k.cstate}</td>
                <td>${k.ccreatime}</td>
                <td>${k.teacher}</td>
            </tr>
        </c:forEach>
    </table>
</div>


</body>
<script type="text/javascript" src="/js/jquery.min.js" ></script>
<script>
    $(function(){
        $("#a1").click(function(){
            $("#xian1").css("display","block");
            $("#xian2").css("display","none");
            $("#xian3").css("display","none");
            $("#xian4").css("display","none");
            $(".body").load("http://localhost:9090/ClassAdd.jsp");
        })
        $("#a2").click(function(){
            $("#xian1").css("display","none");
            $("#xian2").css("display","block");
            $("#xian3").css("display","none");
            $("#xian4").css("display","none");
            $(".body").load("http://localhost:9090/class/selectId");
        })
        $("#a3").click(function(){
            $("#xian1").css("display","none");
            $("#xian2").css("display","none");
            $("#xian3").css("display","block");
            $("#xian4").css("display","none");
            $(".body").load("http://localhost:9090/class/selectAllToJsp");
        })
        $("#a4").click(function(){
            $("#xian1").css("display","none");
            $("#xian2").css("display","none");
            $("#xian3").css("display","none");
            $("#xian4").css("display","block");
            $(".body").load("http://localhost:9090/class/selectAllToDelJsp");
        })
    })
</script>
</html>
